package com.bt.lms.ui.page.common.action.pageteaching;

import com.bt.lms.ui.vo.PageSkipInfo;
import com.bt.lms.ui.page.course.CourseInfoList;
import javafx.event.EventHandler;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;

/**
 * 课程管理标签事件
 */
public class CourseLabLabAction implements EventHandler<MouseEvent> {

    /**
     * 界面跳转数据
     */
    public static PageSkipInfo pageSkipInfo;

    /**
     * 构造事件
     * @param pageSkipInfo 界面跳转数据
     */
    public CourseLabLabAction(PageSkipInfo pageSkipInfo) {
        CourseLabLabAction.pageSkipInfo = pageSkipInfo;
    }

    @Override
    public void handle(MouseEvent event) {

        CourseInfoList pageCourseInfoList = new CourseInfoList();
        Pane pane = pageSkipInfo.getPane();
        Integer index = pageSkipInfo.getIndex();
        pane.getChildren().set(index, pageCourseInfoList);

    }
}
